//
//  BKScrollPageView.h
//  bestkeep
//
//  Created by utouu666 on 17/2/16.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIView+BKFrame.h"
#import "BKContentView.h"
#import "BKTitleView.h"
#import "BKScrollSegmentView.h"

@interface BKScrollPageView : UIView

typedef void(^ExtraBtnOnClick)(UIButton *extraBtn);

@property (copy, nonatomic) ExtraBtnOnClick extraBtnOnClick;
@property (weak, nonatomic, readonly) BKContentView *contentView;
@property (weak, nonatomic, readonly) BKScrollSegmentView *segmentView;

/** 必须设置代理并且实现相应的方法*/
@property(weak, nonatomic)id<BKScrollPageViewDelegate> delegate;


- (instancetype)initWithFrame:(CGRect)frame segmentStyle:(BKSegmentStyle *)segmentStyle titles:(NSArray<NSString *> *)titles pictures:(NSArray *)pictures select_pictures:(NSArray *)select_pictures parentViewController:(UIViewController *)parentViewController delegate:(id<BKScrollPageViewDelegate>) delegate ;

/** 给外界设置选中的下标的方法 */
- (void)setSelectedIndex:(NSInteger)selectedIndex animated:(BOOL)animated;

/**  给外界重新设置的标题的方法(同时会重新加载页面的内容) */
- (void)reloadWithNewTitles:(NSArray<NSString *> *)newTitles;

@end
